import { param } from "@/utils";
import http from "@/utils/request";
const api_name = "/api/post";
export const postApi = {
  async test() {
    return await http.get(`${api_name}/test`);
  },
  async deletePostById(id) {
    return await http.delete(`${api_name}/delete`, id);
  },
  async updateById(data) {
    return await http.put(`${api_name}/update`, data);
  },
  async addPost(data) {
    return await http.post(`${api_name}/add`, data);
  },
  async getPostPage(data) {
    return await http.get(`${api_name}/list`, data);
  },
};
